// 动画定义
@keyframes dialogAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.container {
  box-sizing: border-box;
  padding-top: 50px;
  background: #f6f6f6;
  position: absolute;
  left: 0;
  top: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  width: 100%;
  height: 100%;
}
.mask {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.3s ease;
  .popup {
    width: 325px;
    height: 204px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
    .cancel {
      position: absolute;
      top: -42px;
      right: 0px;
      width: 24px;
      height: 24px;
      border-radius: 50%;
      img {
        width: 24px;
        height: 24px;
      }
    }
    .input-box {
      width: 100%;
      height: 45px;
      display: flex;
      justify-content: center;
      margin-top: 35px;
      .input-item {
        -webkit-appearance: none;
        border-radius: 0;
        width: 255px;
        height: 45px;
        display: flex;
        align-items: center;
        border: none;
        border-bottom: 1px solid #d8d8d8;
        font-size: 14px;
        font-weight: 400;
        color: #333333;
        outline: none;
      }
    }

    .confirm {
      width: 255px;
      height: 44px;
      background: #1784ed;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      cursor: pointer;
      font-weight: 500;
      color: #ffffff;
      margin: 0 auto;
      margin-top: 50px;
    }
  }

  .dialog-box {
    width: 320px;
    max-width: 90vw;
    height: auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: dialogAppear 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    .dialog-header {
      width: 100%;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 600;
      color: #333333;
      background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
      border-bottom: 1px solid #eee;
      position: relative;
      
      &::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: linear-gradient(90deg, #1890ff, #52c41a);
        border-radius: 2px;
      }
    }
    
    .dialog-content {
      flex: 1;
      box-sizing: border-box;
      padding: 24px 20px;
      font-size: 15px;
      line-height: 1.6;
      color: #666666;
      text-align: center;
      
      span {
        color: #1890ff;
        font-weight: 500;
        text-decoration: underline;
        cursor: pointer;
        transition: all 0.3s ease;
        
        &:hover {
          color: #40a9ff;
          text-decoration: none;
        }
        
        &:active {
          transform: scale(0.98);
        }
      }
    }
    
    .dialog-bottom {
      width: 100%;
      box-sizing: border-box;
      padding: 16px 20px 20px;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      background: #fafafa;
      
      .button {
        flex: 1;
        height: 40px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        user-select: none;
        background: linear-gradient(135deg, #1890ff, #40a9ff);
        color: #ffffff;
        border: none;
        outline: none;
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
        
        &:hover {
          background: linear-gradient(135deg, #40a9ff, #1890ff);
          box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
          transform: translateY(-1px);
        }
        
        &:active {
          transform: translateY(0);
          box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
        }
      }
      
      .button2 {
        flex: 1;
        height: 40px;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 500;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        user-select: none;
        background: #ffffff;
        color: #666666;
        border: 1px solid #d9d9d9;
        outline: none;
        
        &:hover {
          background: #fafafa;
          border-color: #40a9ff;
          color: #40a9ff;
          transform: translateY(-1px);
        }
        
        &:active {
          transform: translateY(0);
          background: #f5f5f5;
        }
      }
    }
  }
}
.goods-box {
  width: 100%;
  height: 164px;
  float: left;
  background: #ffffff;
  box-sizing: border-box;
  margin-top: 10px;
  padding: 15px;
  text-align: left;
  .tit {
    width: 100%;
    height: 14px;
    font-size: 14px;
    font-weight: 400;
    color: #333333;
    line-height: 14px;
    margin-bottom: 30px;
  }
  .goods-item {
    width: 100%;
    height: 75px;
    display: flex;
    flex-direction: row;
    .goods-thumb {
      width: 100px;
      height: 75px;
      border-radius: 2px;
      margin-right: 15px;
      img {
        width: 100px;
        height: 75px;
        border-radius: 2px;
      }
    }
    .goods-info {
      width: 66%;
      height: 75px;
      display: flex;
      flex-direction: column;
      .goods-name {
        width: 100%;
        height: 15px;
        font-size: 15px;
        font-weight: 600;
        color: #333333;
        line-height: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: 2px;
        margin-bottom: 10px;
      }
      .goods-label {
        height: 13px;
        font-size: 13px;
        font-weight: 400;
        color: #ff4d4f;
        line-height: 13px;
        margin-bottom: 18px;
      }
      .goods-charge {
        height: 15px;
        font-size: 15px;
        font-weight: 600;
        color: #fd3968;
        line-height: 15px;
      }
    }
  }
}
.promocode-box {
  width: 100%;
  height: 57px;
  float: left;
  background: #ffffff;
  box-sizing: border-box;
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding-left: 15px;
  padding-right: 15px;
  cursor: pointer;
  .info {
    display: inline-block;
    width: auto;
    height: 15px;
    font-size: 15px;
    font-weight: 400;
    color: #333333;
    line-height: 15px;
  }
  img {
    width: 19px;
    height: 19px;
  }
}
.credit2-box {
  width: 100%;
  float: left;
  height: auto;
  background: #ffffff;
  box-sizing: border-box;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 15px;
  .payment-item {
    width: 100%;
    height: 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    margin-bottom: 30px;
    &:last-child {
      margin-bottom: 0px;
    }
    .icon {
      width: 30px;
      height: 30px;
      margin-right: 15px;
    }
    span {
      height: 18px;
      font-size: 18px;
      font-weight: 400;
      color: #333333;
      line-height: 18px;
    }
    .sel {
      width: 24px;
      height: 24px;
      position: absolute;
      right: 0px;
      top: 3px;
      img {
        width: 24px;
        height: 24px;
      }
    }
  }
}
.box-footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 49px;
  box-sizing: border-box;
  background: #ffffff;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  .price-box {
    height: 24px;
    font-size: 16px;
    font-weight: 500;
    color: #ff4d4f;
    line-height: 24px;
    margin-left: 15px;
    .big {
      font-size: 24px;
    }
  }
  .btn-submit {
    width: 144px;
    height: 49px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
  }
}
